import {
  DesktopOutlined,
  FileOutlined,
  PieChartOutlined,
  TeamOutlined,
  UserOutlined,
  MenuUnfoldOutlined,
  MenuFoldOutlined,
} from '@ant-design/icons';
import type { MenuProps } from 'antd';

type MenuItem = Required<MenuProps>['items'][number];

function getItem(
  label: React.ReactNode,
  key: React.Key,
  icon?: React.ReactNode,
  children?: MenuItem[],
): MenuItem {
  return {
    label,
    key,
    icon,
    children,
  } as MenuItem;
}

const items: MenuItem[] = [
  getItem('首页', '/index', <PieChartOutlined />),
  getItem('客户列表', '/customer', <UserOutlined />),
  getItem('今日进分总计', '/grade', <UserOutlined />),
  getItem('管理员管理', '/admin', <TeamOutlined />, [
    getItem('开通账号', '/admin/account'),
    getItem('上下分通知', '31'),
  ]),
  getItem('设置', '/setting', <FileOutlined />, [
    getItem('修改密码', '/setting/EditPassword'),
    getItem('自动删除聊天记录', '213'),
    getItem('紧急指令', '8'),
    getItem('日志', '/setting/Log'),
  ]),
];
export default items;
